<?php
    use mForge\Helpers\Url;
    use mForge\Modules\FlashMessenger\Helper as FlashMessenger;
    use mForge\Modules\Authentication\Helper as AuthHelper;
    use mForge\Modules\Menu\Helper as MenuHelper;
?>
<!doctype html>
<html>
    <head>
        <title><?php echo $pageTitle; ?> | mForge</title>

        <meta charset="utf-8" />

        <style type="text/css" media="screen">
            @import '<?php Url::baseUrl(); ?>/css/default.css';
        </style>
    </head>
    <body>
        <div id="page">
            <?php if (AuthHelper::isAuthenticated()): ?>
            <div id="administration">
                <h3>mForge administration</h3>
                <div id="menu"><?php MenuHelper::renderMenu('administration') ?></div>
                <div id="logout-link"><?php AuthHelper::logoutLink('Log out'); ?></div>
            </div>
            <?php endif; ?>
            <div id="header">

            </div>
            <?php if(FlashMessenger::hasMessages()): ?>
            <ul id="flash-messenger">
                <?php foreach (FlashMessenger::getMessages() as $message): ?>
                <li class="<?php echo $message->type; ?>"><?php echo $message->text; ?></li>
                <?php endforeach; ?>
            </ul>
            <?php endif; ?>
            <div id="content">
                <h1><?php echo $pageTitle; ?></h1>
                <?php echo $this->getContent(); ?>
            </div>
            <div id="footer">
                
            </div>
        </div>
    </body>
</html>